[Solved] Multiseries chart in reports

Getting your data onto paper - or the web - Discussing the reports features of Base

[Solved] Multiseries chart in reports

Postby longi » Wed Aug 27, 2014 8:47 am

Hi!
Firstly thanks for reading this post.
I am able to build a report with a graph from a query, but until now I've only made graphs with only one serie of data.
Now I have a query which is like a resume of an amount of data, which is perfect to make a graph with several series, to compare them.
I am not able to deal with matrix or bidimensional arrays (put my query into a bidimensional array) to put data into the grid of data of the graph.
Anybody know how to deal with this kind of object?

The code I need to manipulate is the next:
Code: Select all   Expand viewCollapse view
   While oResultset.next 'Esto es del libro de Mauricio
  for i=0 to 0
   'Redimensionamos la matriz
    Redim Preserve mDirectorio( co1,Columnas)
    'Guardamos los datos en el nuevo indice
    mDirectorio( co1,i) = oResultset.getString(2) 'El 2 hace referencia al número de la columna que hay en la consulta
    'Vamos construyendo nuestro directorio               
    sTmp = sTmp & mDirectorio( co1,i)
   'Incrementamos nuestro contador de registros
    co1 = co1 + 1
Next
Wend 

I attach the example I got with one serie. The report should be opened by the macro. I erased the form with a button to open it because the weight of de database, in order to be able to send it.

Thanks in advance!
Attachments
GRAFICO MULTISERIE.rar
(75.17 KiB) Downloaded 69 times
Last edited by longi on Mon Sep 01, 2014 9:12 am, edited 1 time in total.
OpenOffice 4.1.5 on Windows 10
LibreOffice 5.1 on Windows 7
LibreOffice 6.0.1 on Windows10
longi
 
Posts: 109
Joined: Mon Jul 15, 2013 5:04 pm

Re: Multiserie graph in reports

Postby longi » Mon Sep 01, 2014 9:11 am

Hi!

I've just solved this pathc I needed.
I don't know if it is a general solution or only a particular solution, but it works in this case.
I made loads of trials to get it, but it could be a good thing that other people tried the 'solution' in other examples, because I don't want 'my solution', I want a general solution for everyone....
Here you are the piece of code that I changed. Also I've attached the data base with all example (If I knew how to attach images....!)

Code: Select all   Expand viewCollapse view
While oResultset.next 'Esto es del libro de Mauricio
   for i=0 to Columnas-2
   'Redimensionamos la matriz
    Redim Preserve mDirectorio( co1,Columnas-2)
    'Guardamos los datos en el nuevo indice
    mDirectorio( co1,i) = oResultset.getString(i+2)
    'Vamos construyendo nuestro directorio
   next       
    sTmp = sTmp & mDirectorio( co1,i-1)   
   'Incrementamos nuestro contador de registros
    co1 = co1 + 1
Wend 


I hope it were useful! :super:
Attachments
GRAFICO MULTISERIE ARREGLADO.rar
(75.22 KiB) Downloaded 79 times
OpenOffice 4.1.5 on Windows 10
LibreOffice 5.1 on Windows 7
LibreOffice 6.0.1 on Windows10
longi
 
Posts: 109
Joined: Mon Jul 15, 2013 5:04 pm


Return to Reporting

Who is online

Users browsing this forum: No registered users and 1 guest