Академический Документы
Профессиональный Документы
Культура Документы
Resumido de Hyperion
Bision Technology
Capacita@bision.cl
1. Programacin
Consideraciones de Programacin
En este curso se aplicaran cada uno de los cdigos descritos a continuacin su aplicacin a travs de
ejemplos de didcticos permitir a cada alumno poder desarrollar cualquier documento a partir de este set
de cdigos
Comentarios de Columnas
********************************************************************************
Booleanos
********************************************************************************
Operadores
== Equal
!= Not equal
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
Bision Technology
Capacita@bision.cl
Operadores Lgicos
********************************************************************************
Manejo de del IF
Sintaxis:
if ( name == "Mark")
{
Alert("Hello Mark");
}
else
{
Alert("Goodbye");
}
********************************************************************************
Llenar un cuadro despegable
ActiveDocument.Sections["Resultados"].Limits[1].RefreshAvailableValues()
var llenar =ActiveDocument.Sections["Resultados"].Limits[1].AvailableValues.Count;
Despegable.RemoveAll();
Despegable.Add("- Todos -")
for(i=1;i<=llenar;i++)
{Despegable.Add(ActiveDocument.Sections["Resultados"].Limits[1].AvailableValues[i])
}
********************************************************************************
Seleccionar Opciones de un Cuadro despegable
ActiveDocument.Sections["Resultados"].Limits[1].RefreshAvailableValues()
var
choice=ActiveDocument.Sections["EIS"].Controls.Despegable[Despegable.SelectedIndex]
if (choice == "- Todos -")
{ActiveDocument.Sections["Resultados"].Limits[1].SelectedValues.AddAll()}
else
{ActiveDocument.Sections["Resultados"].Limits[1].SelectedValues.Add(choice)}
********************************************************************************
Bision Technology
Capacita@bision.cl
Llenar una Lista
ActiveDocument.Sections["Resultados"].Limits[1].RefreshAvailableValues()
llenar=ActiveDocument.Sections["Resultados"].Limits[1].AvailableValues.Count
Lista.RemoveAll()
Lista.Add("-Todos-")
for(i=1;i<=llenar;i++)
{Lista.Add(ActiveDocument.Sections["Resultados"].Limits[1].AvailableValues[i])}
********************************************************************************
var
uno= Lista.SelectedList.Item(1)
if (uno =="-Todos-")
{
ActiveDocument.Sections["Resultados"].Limits[1].SelectedValues.AddAll()}
else
{
contar = Lista.SelectedList.Count
if (contar !=0)
{
ActiveDocument.Sections["Resultados"].Limits[1].RefreshAvailableValues()
caja = new Array(contar)
for (i=1;i<=contar;i++)
{choice = Lista.SelectedList.Item(i)
caja[i] = choice}
for (i=1;i<=contar;i++)
{ActiveDocument.Sections["Resultados"].Limits[1].SelectedValues.Add(caja[i])
}
}
}
********************************************************************************
Activar una seccin
ActiveDocument.Sections["Seccion"].Activate()
********************************************************************************
Imprimir un Reporte
ActiveDocument.Sections["Seccion"].PrintOut()
*******************************************************************************
Bision Technology
Capacita@bision.cl
Exportar una seccin
ActiveDocument.Sections["Seccion"].Export()
********************************************************************************
Procesar Consultas
ActiveDocument.Sections["Consulta"].Process()
*******************************************************************************
MyConnection = ActiveDocument.Sections["Consulta"].DataModel.Connection
MyConnection.Open("C:\\brio.oce")
MyConnection.Username = "usuario"
MyConnection.SetPassword('password')
MyConnection.Connect()
********************************************************************************
Esconder barras de herramientas
Toolbars[1].Visible= false
Toolbars[2].Visible=false
Toolbars[3].Visible=false
Toolbars[4].Visible=false
Application.ShowMenuBar =false
ActiveDocument.ShowCatalog=false
ActiveDocument.ShowSectionTitleBar=false
********************************************************************************
nom = nom1.Text
fec = fecha1.Text
doc = doc1.text
job = job1.text
// los valores deben ser rescatados desde donde se encuantren tales valores
// en el caso del nombre del usuario el cdigo debera ser
// nom = Documents["Menu"].Sections["Inicio"].Shapes["user"].Text
// el documento deberia ser
// doc = Documents["Menu"].Name
// y el job, q es el trabajo q realiza el usuario, deberia ser
Bision Technology
Capacita@bision.cl
// job = "Exportar vtas mensual por cliente"
********************************************************************************
PROCESA APPEND-QUERIES
var
anio=ao.Text
ActiveDocument.Sections["CONSULTA"].AppendQueries["VENTAS"].Limits[1].CustomValues.RemoveAll()
ActiveDocument.Sections["CONSULTA"].AppendQueries["VENTAS"].Limits[1].CustomValues.Add(anio)
ActiveDocument.Sections["CONSULTA"].AppendQueries["VENTAS"].Limits[1].SelectedValues.AddAll()
********************************************************************************
var choice=ActiveDocument.Sections["EIS"].Shapes["ao"].Text
ActiveDocument.Sections["Resultados"].Limits[1].CustomValues.RemoveAll()
ActiveDocument.Sections["Resultados"].Limits[1].CustomValues.Add(choice)
ActiveDocument.Sections["Resultados"].Limits[1].SelectedValues.AddAll()
********************************************************************************
ActiveDocument.Sections["Pivot"].SideLabels["Tipo De Artculo"].Remove()
ActiveDocument.Sections["Pivot"].SideLabels.Add("Tipo Establecimiento")
********************************************************************************
ActiveDocument.Sections["EIS"].SideLabels["Tipo De Artculo"].Remove()
ActiveDocument.Sections["EIS"].SideLabels["Tipo Establecimiento"].Remove()
********************************************************************************
ActiveDocument.Sections["Pivot"].SideLabels["Tipo Establecimiento"].Totals.Add()
ActiveDocument.Sections["Pivot"].SideLabels["Tipo Establecimiento"].AutoSizeWidth()
Bision Technology
Capacita@bision.cl
********************************************************************************
/*
objExcel.Rows.Range("b3").activate
//objExcel.Rows.Range("b3").Value= tit1.Text
objExcel.Rows.Range("b3").Font.Name = "Verdana"
objExcel.Rows.Range("b3").Font.Bold = 1
objExcel.Rows.Range("b3").Font.Italic = 1
objExcel.Rows.Range("b3").Font.Size= 10
*/
pegatabla("T1", 4)
pegatabla("T2", 10)
pegatabla("T3", 25)
pegagrafico("G2",4,7)
/*
pegatabla("T3", 40)
pegatabla("T4", 60)
pegatabla("T5", 80)
pegatabla("T6", 100)
pegatabla("T7", 120)
Bision Technology
Capacita@bision.cl
*/
objExcel.Visible = true
for(i=0+posicion;i<pivotRows+posicion;i++)
{
objCells.Item(1,i).Interior.colorindex=15
for(j=1;j<=pivotColumns;j++)
{
if(i==posicion)
{
objCells.Item(j,posicion).Interior.colorindex=15
}
objCells.Item(j,i).Font.Name = "Verdana"
objCells.Item(j,i).Font.Size= 7
objCells.Item(j,i).Borders.LineStyle = 1
if(objCells.Item(j,i).Value=="?")
objCells.Item(j,i).Font.Color= -16776961
if(objCells.Item(j,i).Value=="?")
objCells.Item(j,i).Font.Color= -11489280
}
}
}
********************************************************************************
Bision Technology
Capacita@bision.cl
CAMBIAR HECHOS EN UN GRAFICO
var
stock = ActiveDocument.Sections["EIS"].Shapes["stock_mes"].Text
ActiveDocument.Sections["Grafico"].Facts.Add(stock)
********************************************************************************
CAMBIAR NOMBRE FISICO A UNA TABLA
var
uno="Tabla Articulos"
ActiveDocument.Sections["Consulta"].DataModel.Topics["planta"].PhysicalName=uno
ActiveDocument.Sections["Consulta"].DataModel.SyncWithDatabase()
********************************************************************************
ActiveDocument.Sections["Consulta"].DataModel.Joins.RemoveAll()
var
a=ActiveDocument.Sections["Consulta"].DataModel.Topics["Clientes"].TopicItems.Item(1)
b=ActiveDocument.Sections["Consulta"].DataModel.Topics["VENTAS"].TopicItems.Item(2)
ActiveDocument.Sections["Consulta"].DataModel.Joins.Add(a,b,bqJoinSimpleEqual)
********************************************************************************
INSERTAR VALORES EN UNA COLUMNA EN TABLA RESULTADOS
valor=ActiveDocument.Sections["INICIO"].Shapes["Valor Dolar"].Text
lugar=ActiveDocument.Sections["Resultados"].Columns["Valor Dolar"].Index
ActiveDocument.Sections["Resultados"].Columns.ModifyComputed(lugar,"'"+valor+"'")
********************************************************************************
var
factual = fecha.Text
ActiveDocument.Sections["Consulta"].Limits.RemoveAll()
MyLimit = ActiveDocument.Sections["Consulta"].Limits.CreateLimit("Clientes.Mes_de_Proceso")
MyLimit.Operator = bqOperatorEqual
MyLimit.CustomValues.Add(factual)
MyLimit.SelectedValues.Add(factual)
ActiveDocument.Sections["Consulta"].Limits.Add(MyLimit)
********************************************************************************
Bision Technology
Capacita@bision.cl
INSTRUCCION CASE
var ReturnVal =0
ReturnVal = Alert("SELECCIONE UNA OPCION. ","Proyecto","IMPRIMIR INFORME","VISUALIZAR
INFORME","VOLVER")
switch (ReturnVal)
{
case 1:
ActiveDocument.Sections["Informe"].PrintOut()
break;
case 2:
ActiveDocument.Sections["Informe"].Activate()
break;
default:
break;
}
********************************************************************************
Cerrar un documento
ActiveDocument.Close()
********************************************************************************
Mensaje de Alerta
********************************************************************************
Salir de Brioquery
Application.Quit()
********************************************************************************
Bision Technology
Capacita@bision.cl
Para enviar un correo mediante Brio
********************************************************************************
if (ActiveDocument.Sections["Results"].RowCount == 0)
{
Application.Alert("No Records Found");
}
else
{
Application.Alert (ActiveDocument.Sections["Results"].RowCount + " Records Returned");
}
Bision Technology
Capacita@bision.cl