Skip to main content

Show chart by default

Hi,
I have an idea script with the following steps
1. Create a chart based on a database, say db1.
2. Execute extraction on another database, say db2.
3. Open chart of db1
4. Open extracted database from step2.
Problem I am facing is that, the chart generated is not showing up while opening db1. It is showing data instead of chart. Is there any way to show chart by default?
I am using Client.OpenDatabase(db1) to show graph.
Thanks,
Shafeer

Brian Element Wed, 11/09/2016 - 07:41

Hi Shafeer,

I just tried different scenarios out and it doesn't look like you can have a file open to a default chart.  Probably the best alternative is to have a message saying for the user to open the chart on their own.

Brian

mohamed Thu, 03/09/2017 - 04:12

Hi Brian, 
There is an option to show chart by default. We can use Database.SelectResult method to show chart after opening database. This information is available in IDEA help. Give the chart name as the parameter.
Database.SelectResult
Selects a specified result by name. The selected result becomes the active result.
Syntax
Database.SelectResult(resultName As String)
Parameters
[in] resultName
The name of the result.
Return Value
 
Example
Sub Main
' Open the database.
Set db = Client.OpenDatabase("Sample-Detailed Sales.IDM")
' Select the result to use.
db.SelectResult "Aging"
' Clear the memory.
Set db = Nothing
 
End Sub